<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../layui/css/layui.css">
    <link rel="stylesheet" href="../css/cropper.min.css">
    <link rel="stylesheet" href="../css/user_avatat.css">
</head>

<body>
    <!-- 卡片区域 -->
    <div class="layui-card">
        <div class="layui-card-header">更改头像</div>
        <div class="layui-card-body">
            <div class="row1">
                <div class="cropper-box">
                    <img src="../images/18.jpeg" alt="" id="imgs">
                </div>
                <!-- 设置图片的预览区域 -->
                <div class="preview-box">
                    <div>
                        <!-- 100*100 -->
                        <div class="img-preview w100"></div>
                        <p>100 x 100</p>
                    </div>
                    <div>
                        <!-- 50*50 -->
                        <div class="img-preview w50"></div>
                        <p>50 x 50</p>
                    </div>
                </div>
            </div>
            <!-- 上传功能 -->
            <div class="row2">
                <input type="file" id="file" accept="image/png,image/jpeg,image/jpg">
                <button class="layui-btn" id="btnhooseImage">上传</button>
                <button class="layui-btn layui-btn-danger" id="btnUpload">确定</button>
            </div>
        </div>
    </div>

</body>

</html>
<script src="../layui/layui.js"></script>
<script src="../js/jquery-3.6.1.min.js"></script>
<!-- 裁剪插件 -->
<script src="../js/cropper.min.js"></script>
<script src="../js/user_avatar.js"></script>